From: Rui Matos Date: Sat, 3 Oct 2015 19:21:24 +0000 (+0200) Subject: shell-glsl-quad: Set the pipeline blend string explicitly X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1148 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=44047ac881f97d6d43d5f78944934d79250bac69;p=gnome-shell.git shell-glsl-quad: Set the pipeline blend string explicitly The default pipeline color is opaque white and blending is turned off. If we only draw with that color (e.g. because animations are disabled and we're always drawn with opacity == 255), blending is kept disabled since cogl_pipeline_set_color() returns early if the color doesn't change from what was there before. In our case we always want blending to be enabled which we can achieve by setting the blending string ourselves. https://bugzilla.gnome.org/show_bug.cgi?id=755827 --- diff --git a/src/shell-glsl-quad.c b/src/shell-glsl-quad.c index b24f0ce80..21652d1c4 100644 --- a/src/shell-glsl-quad.c +++ b/src/shell-glsl-quad.c @@ -139,6 +139,7 @@ shell_glsl_quad_constructed (GObject *object) if (G_UNLIKELY (klass->base_pipeline == NULL)) { klass->base_pipeline = cogl_pipeline_new (ctx); + cogl_pipeline_set_blend (klass->base_pipeline, "RGBA = ADD (SRC_COLOR * (SRC_COLOR[A]), DST_COLOR * (1-SRC_COLOR[A]))", NULL); if (klass->build_pipeline != NULL) klass->build_pipeline (self);